package com.dog.framework.core.exception;

import com.dog.framework.core.enums.ResponseCodeEnum;
import lombok.EqualsAndHashCode;

/**
 * 业务逻辑异常 Exception
 */
@EqualsAndHashCode(callSuper = true)
public final class ServiceException extends  BaseException {

    private static final long serialVersionUID = 1L;

    public ServiceException(Integer code,String msgKey,Object[] args) {
        super("service",code ,msgKey, args);
    }

    public ServiceException(Integer code,String msgKey) {
        super("service", code,msgKey);
    }


    public ServiceException(String msgKey, Object[] args) {
        super("service", msgKey, args);
    }

    public ServiceException(String msgKey) {
        super("service", msgKey);
    }

    public ServiceException(ResponseCodeEnum responseCodeEnum) {
        super("service", responseCodeEnum.getCode(),responseCodeEnum.getMsg());
    }


}
